import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/Home.vue'
import { store } from 'core-js/modules/_wks'

Vue.use(VueRouter)


// 2. 定义路由
// 每个路由应该映射一个组件。
const routes = [
	{
	  path: '',
	  name: 'Home',
	  component: Home,
	  children: [
			{
			  path: '/',
			  component: r => require.ensure([], () => r(require('@/views/index')), 'index')
			},
			{
			  path: '/:type/all',
			  component: r => require.ensure([], () => r(require('@/views/category/BlogAllCategoryTag')), 'blogallcategorytag')
			}
		],
	}
]


//3. 创建 router 实例，然后传 `routes` 配置
const router = new VueRouter({
	routes
	
})
export default router
